﻿Imports System.Resources

Public Class frmDataChoix
    Private rm As New ResourceManager(GetType(frmDataChoix))

    Private Sub BtnObservation_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PtcDataObs.Click
        Try
            Me.CreateObservationTable()
            frmDataObsTable.Show()
            Me.Hide()
        Catch ex As Exception
            MsgBox(ex.Message, MsgBoxStyle.Critical, "Pocket eReleve")
        End Try
    End Sub

    Private Sub BtnTracks_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PtcDataTracks.Click
        frmDataTracks.Show()
        Me.Hide()
    End Sub

    Private Sub btn_Menu_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_Menu.Click
        FormMain.Show()
        Me.Hide()
    End Sub

    Public Sub CreateObservationTable()
        Try
            If FormMain.oListObs.lstStations.Count > 0 Then
                frmDataObsTable.dgGrid2.DataSource = ExportListObsToDataTable()
            Else
                frmDataObsTable.dgGrid2.DataSource = Nothing
            End If
        Catch ex As Exception
            Throw New Exception(ex.Message)
        End Try
    End Sub

 
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
        frmChronometre.Show()
        Me.Hide()

    End Sub
End Class